@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ifm-font-family-base:
    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --ifm-font-family-monospace:
    'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas,
    'Liberation Mono', 'Courier New', monospace;
  --ifm-code-font-size: 95%;
  --ifm-border-radius-base: 12px;

  /* Accent tokens */
  --vest-ink: #0e1324;
  --vest-pink: #ff4f8f;
  --vest-slate: #0f172a;

  /* Midnight & Neon palette (light mode) */
  --ifm-color-primary: #5f6afc;
  --ifm-color-primary-dark: #4c55e8;
  --ifm-color-primary-darker: #3d3fcf;
  --ifm-color-primary-darkest: #2d2ea8;
  --ifm-color-primary-light: #7f8bff;
  --ifm-color-primary-lighter: #a7b3ff;
  --ifm-color-primary-lightest: #d9ddff;

  --ifm-background-color: #ffffff;
  --ifm-navbar-background-color: rgba(255, 255, 255, 0.82);
  --ifm-navbar-shadow: none;
  --ifm-heading-color: #0b1021;
  --ifm-font-color-base: #0f172a;
  --ifm-card-background-color: #eef1f7;
  --docusaurus-highlighted-code-line-bg: rgba(99, 102, 241, 0.1);

  /* Light mode code block improvements */
  --prism-background-color: #f6f8fa;
  --prism-color: #24292e;

  /* Global background gradient */
  --vest-body-bg-gradient: linear-gradient(
    180deg,
    rgba(247, 249, 253, 0.75),
    rgba(252, 252, 255, 0.98)
  );

  /* Footer theming */
  --vest-footer-bg: #1e293b;
  --vest-footer-color: #e2e8f0;
}

html[data-theme='dark'] {
  --ifm-background-color: var(--vest-slate);
  --ifm-font-color-base: #e6e9f4;
  --ifm-heading-color: #f8fafc;
  --ifm-navbar-background-color: rgba(15, 23, 42, 0.78);
  --ifm-card-background-color: rgba(22, 30, 46, 0.7);
  --docusaurus-highlighted-code-line-bg: rgba(99, 102, 241, 0.15);
  --vest-body-bg-gradient: none;
  --vest-footer-bg: linear-gradient(
    180deg,
    rgba(79, 70, 229, 0.12),
    rgba(15, 23, 42, 0.92)
  );
  --vest-footer-color: #e2e8f0;
}

body {
  background: var(--vest-body-bg-gradient), var(--ifm-background-color);
  color: var(--ifm-font-color-base);
}

main {
  background-color: transparent;
}

.navbar {
  background-color: transparent !important;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(12px);
  background-color: var(--ifm-navbar-background-color);
}

html[data-theme='dark'] .navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.docusaurus-highlight-code-line {
  display: block;
  margin: 0 calc(-1 * var(--ifm-pre-padding));
  padding: 0 var(--ifm-pre-padding);
  background-color: var(--docusaurus-highlighted-code-line-bg);
}

/* Light mode code block improvements - GitHub Light inspired */
html[data-theme='light'] .prism-code {
  background-color: var(--prism-background-color) !important;
  color: var(--prism-color) !important;
  border: 1px solid #e1e4e8;
}

html[data-theme='dark'] .prism-code {
  border: 1px solid #334155;
}

html[data-theme='light'] pre[class*='language-'] {
  background-color: var(--prism-background-color);
  border: 1px solid #e1e4e8;
}

html[data-theme='light'] code[class*='language-'] {
  color: var(--prism-color);
  background-color: transparent;
}

.footer {
  background: var(--vest-footer-bg);
  color: var(--vest-footer-color);
}

.hero__title,
.hero__subtitle {
  color: var(--ifm-heading-color);
}

html[data-theme='dark'] .hero__title,
html[data-theme='dark'] .hero__subtitle {
  color: var(--ifm-color-primary-lightest);
}

.header-badge {
  display: flex;
}

.header-github-link {
  content: '';
  background-color: var(--ifm-font-color-base);
  mask-image: url('/img/github.svg');
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.5rem;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.header-github-link:hover {
  background-color: var(--ifm-color-primary);
  transform: translateY(-1px);
}

html[data-theme='dark'] .header-github-link {
  background-color: var(--ifm-color-primary-lightest);
}

.aa-DetachedSearchButton {
  color: var(--ifm-color-primary);
}

h1 {
  padding-bottom: 1rem;
}

/* Hero title typography improvements */
.hero__title {
  letter-spacing: -0.4px;
  line-height: 1.08;
}

/* Announcement bar dark mode fix */
html[data-theme='dark'] [class*='announcementBar'] {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

html[data-theme='dark'] [class*='announcementBar'] a {
  color: var(--ifm-color-primary-lighter);
}

html[data-theme='dark'] [class*='announcementBar'] a:hover {
  color: var(--ifm-color-primary-lightest);
}
